package org.nashua.tt151;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Victor;
public class FrontEndLoader extends SimpleRobot {
    private Joystick joy = new Joystick(1);
    private Victor vic = new Victor(1);
    public void autonomous() {
        while (isEnabled()&&isAutonomous()) {
            vic.setRaw(255);
            try {
                Thread.sleep(100);
            } catch (InterruptedException ex) {
            }
            vic.setRaw(0);
        }
    }
    public void operatorControl() {
        while (isEnabled()&&isOperatorControl()) {
            vic.setRaw((int)((joy.getY()+1)*255));
        }
    }
}
